/*
 * peerList.h
 *
 *  Created on: 2010-3-11
 *      Author: abc
 */

#ifndef PEERLIST_H_
#define PEERLIST_H_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <errno.h>
#include <netinet/in.h>
#include <pthread.h>
#define MAXLEN 256
typedef struct _clientinfo{
    char name[10];
    struct sockaddr_in addr_in;
    struct _clientinfo* next;
}clientinfo,* pclientinfo;
struct message
{
	char flag[15];
	char name[10];
	int size;
	char msg[MAXLEN];
};

extern pclientinfo CreateLinkList(void);
extern void deletelist(pclientinfo L ,char* name);
extern void insertend(pclientinfo L,pclientinfo M);
extern int isexisted(pclientinfo L, char* name);
extern void DisplayList(pclientinfo L);



#endif /* PEERLIST_H_ */
